<?php
namespace app\common;
use think\Controller;
use think\Request;
use app\api\model\Logs as LogsModel;
class Logs{    
    public static function add($action,$operator,$sn=null,$old=null,$new=null){  
        $logsModel = new LogsModel([
            'operator_id'=>$operator,
            'sn'=>$sn,
            'action'=>$action,
            'old'=>$old,
            'new'=>$new
        ]); 
        $logsModel->save();
    }    
}